package com.dina.saas.peccancy.util;

import com.dina.saas.peccancy.domain.RequestPeccMsg;
import com.dina.saas.peccancy.domain.ResponsePeccMsg;

public abstract class Task {

	// 下载地址
	protected String url;

	protected String picUrl;
	// 下载的结果数据
	protected String result;

	protected RequestPeccMsg requestMsg;

	public String getEncodingUrl() {
		return (url.replaceAll(" ", "%20"));

	}
	
	public String getEncodingUrl(String url) {
		return (url.replaceAll(" ", "%20"));

	}

	public String getEncodingPicUrl() {
		return (picUrl.replaceAll(" ", "%20"));

	}

	public abstract ResponsePeccMsg execute();

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public RequestPeccMsg getRequestMsg() {
		return requestMsg;
	}

	public void setRequestMsg(RequestPeccMsg requestMsg) {
		this.requestMsg = requestMsg;
	};

}
